/*
 * @Author: HuangYue
 * @Date: 2022-05-09 11:55:15
 * @LastEditors: HuangYue
 * @LastEditTime: 2022-05-09 16:00:24
 * @FilePath: /graduation/src/components/DeviceDetail/DeviceVisualization/components/Column/index.jsx
 * @Description:
 */
import React, { useState, useEffect } from 'react';
import { Column } from '@ant-design/plots';

const DemoColumn = ({ data }) => {
  const config = {
    data,
    xField: 'time',
    yField: 'count',
    label: {
      // 可手动配置 label 数据标签位置
      position: 'middle',
      // 'top', 'bottom', 'middle',
      // 配置样式
      style: {
        fill: '#FFFFFF',
        opacity: 0.6,
      },
    },
    xAxis: {
      label: {
        autoHide: true,
        autoRotate: false,
      },
    },
    meta: {
      type: {
        alias: '类别',
      },
      sales: {
        alias: '数据上传量',
      },
    },
  };
  return <Column {...config} />;
};
export default DemoColumn;
